package com.xiaoshuidi.cloud.module.member.pojo.topics;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaoshuidi.cloud.framework.tenant.core.db.TenantBaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@TableName(value = "member_topics", autoResultMap = true)
@KeySequence("member_topics_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class MemberTopics extends TenantBaseDO {
    private static final long serialVersionUID = 6711855464643092654L;

    @TableId(type = IdType.AUTO)
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "话题名称")
    private String name;

    @Schema(description = "描述")
    private String description;

    @Schema(description = "话题状态1-启用,0-关闭")
    private Boolean status;

    @Schema(description = "有效开始时间")
    private LocalDateTime effectBeginTime;

    @Schema(description = "有效结束时间")
    private LocalDateTime effectEndTime;

    @Schema(description = "权重")
    private Integer weight;

    @Schema(description = "活动描述")
    private String details;

    @Schema(description = "话题主图片")
    private String images;

    @Schema(description = "创建人")
    private String creatorName;

    @Schema(description = "奖励积分")
    private Integer bonusPoints;

}
